    <h1><?php print _('安装数据库') ?></h1
    <p> <?php print _('请选择数据库类型，输入验证信息。安装程序不会为你建立一个新的数据库。需要自己建立一个数据库。如果在同一数据库中已经安装了一套phpBIZ，表前缀用于避免数据冲突。') ?> </p>

    <?php if (isset($templateData['isMultisite']) && $templateData['isMultisite']): ?>
    <p class="warning">
      <?php print _("This is a multisite installation. Remember that each multisite requires its own database tables. Either choose a different database or a different table prefix for each multisite!"); ?>
    </p>
    <?php endif; ?>

    <form method="post" action="">
      <table>
	<tr>
	  <td class="label">
	    <?php print _('数据库类型：') ?>
	  </td>

	  <td>
	    <select name="type">
	      <?php foreach ($templateData['dbList'] as $key => $value): ?>
	      <option value="<?php print $key ?>"
		<?php if (!empty($templateData['dbSelected'][$key])): ?>
		selected="selected"
		<?php endif; ?>
		><?php print $value ?></option>
	      <?php endforeach; ?>
	    </select>
	  </td>
	</tr>
	<?php if (!empty($templateData['error']['phpDbMissing'])): ?>
	<tr>
	  <td colspan="2" class="error">
	    <?php print $templateData['error']['phpDbMissing'] ?>
	  </td>
	</tr>
	<?php endif; ?>

	<tr>
	  <td class="label"><?php print _('数据库主机地址：') ?></td>
	  <td>
	    <input name="hostname" type="text" size="30"
	      value="<?php print $templateData['config']['hostname'] ?>" />
	    <input type="hidden" name="action" value="save"/>
	    <input type="hidden" name="confirmReuseTables" value=""/>
	    <input type="hidden" name="confirmCleanInstall" value=""/>
	  </td>
	</tr>
	<tr>
	  <td class="label"><?php print _('数据库用户名：') ?></td>
	  <td>
	    <input name="username" type="text" size="30"
	      value="<?php print $templateData['config']['username'] ?>" />
	  </td>
	</tr>
	<tr>
	  <td class="label"><?php print _('数据库密码：') ?></td>
	  <td>
	    <input name="password" type="password" size="30"
	      value="<?php print $templateData['config']['password'] ?>" />
	  </td>
	</tr>
	<tr>
	  <td class="label"><?php print _('数据库名：') ?></td>
	  <td>
	    <input name="database" type="text" size="30"
	      value="<?php print $templateData['config']['database'] ?>" />
	  </td>
	</tr>
	<tr>
	  <td class="label"><?php print _('数据表前缀:') ?></td>
	  <td>
	    <input name="tablePrefix" type="text" size="30"
	      value="<?php print $templateData['config']['tablePrefix'] ?>" />
	  </td>
	</tr>
	<?php if (!empty($templateData['error']['tablePrefix'])): ?>
	<tr>
	  <td colspan="2" class="error">
	    <?php print $templateData['error']['tablePrefix'] ?>
	  </td>
	</tr>
	<?php endif; ?>
	     </table>
    </form>
    

     <div class="go">
      <?php if (isset($templateData['showConfirmCleanInstall'])): ?>
      <span class="goToNextL">
	<a href="javascript:document.forms[0].confirmCleanInstall.value='true'; document.forms[0].submit()"><?php print _('Erase Data For A Clean Install') ?></a>
      </span>
      <?php endif; ?>
      <span class="goToNext<?php if (isset($templateData['showConfirmReuseTables'])) print 'L' ?>">
	<a href="javascript:document.forms[0].submit()"><?php print _('保存') ?></a>
      </span>
      <?php if (isset($templateData['showConfirmReuseTables'])): ?>
      <span class="goToNext">
	<a href="javascript:document.forms[0].confirmReuseTables.value='true'; document.forms[0].submit()"><?php print _('Reuse Existing Tables') ?></a>
      </span>
      <?php endif; ?>
    </div>

